Swap out Library sample components for @cratis/components equivalents#377
Draft
Swap out Library sample components for @cratis/components equivalents#377
Conversation
Co-authored-by: einari <134365+einari@users.noreply.github.com>
…y sample Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Swap components in Library sample to CommandForm
Swap out Library sample components for @cratis/components equivalents
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Library sample contained hand-rolled duplicates of components already provided by
@cratis/components, and dialog forms used manualuseState+ PrimeReact primitives instead of theCommandFormabstraction.Added dependency
@cratis/componentsadded toLibrary/package.jsonCommand dialogs rewritten with CommandForm
AddAuthorandAddBooknow useCommandDialog+ typed field components from@cratis/components, eliminating manual state and imperative command wiring:AddBookadditionally usesNumberFieldandDropdownFieldfor author selection.Duplicate components removed
The following local implementations are replaced by re-exports from
@cratis/components:Components/Common/{Page,FormElement,ErrorBoundary}.tsx@cratis/components/CommonComponents/Dialogs/{ConfirmationDialog,BusyIndicatorDialog}.tsx@cratis/components/DialogsComponents/DataTables/{DataTableForObservableQuery,DataTableForQuery}.tsx@cratis/components/DataTablesComponents/DataPage/DataPage.tsx@cratis/components/DataPageEach
index.tsnow re-exports from the package, keeping existing path-aliased imports working without changes to consumers.Minor fixes
DefaultLayout.tsximportsErrorBoundarydirectly from@cratis/components/CommonAuthors.tsx/Inventory.tsx: addedpanelprop to<Page>(the@cratis/componentsversion applies thepanelCSS class conditionally); removed unusedDialogResultimportsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
ofcncog2cu-dsn.algolia.net/opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/Samples/Samples/.yarn/releases/yarn-4.5.3.cjs add @cratis/components(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.